<script setup lang="ts">
const props: any = defineProps<{
    ujt: any;
}>();
const { $db, $fn } = props.ujt;
const { addUser, cmLvList } = $fn.useUser(props);
</script>

<template>
    <div class="as-user-area-manage">
        <div class="as-user">
            <slot name="tit"></slot>
            <label>
                <div>{{ $fn.lg('channeluser.data.us') }}：</div>
                <input v-model="$db.channeluser.cur.us" />
            </label>
            <label>
                <div>{{ $fn.lg('channeluser.data.pw') }}：</div>
                <input type="password" v-model="$db.channeluser.cur.pw" />
            </label>
            <label>
                <div>{{ $fn.lg('channeluser.data.lv') }}：</div>
                <select v-model="$db.channeluser.cur.lv">
                    <option
                        v-for="item of cmLvList"
                        :key="'lv' + item[0]"
                        :value="+item[0]"
                    >
                        {{ item[1] }}
                    </option>
                </select>
            </label>
            <div class="as-user-btns">
                <div class="cur" @pointerdown="addUser()">
                    {{ $fn.lg('channeluser.ui.add') }}
                </div>
                <slot name="btn"></slot>
            </div>
        </div>
    </div>
</template>

<style scoped lang="scss"></style>
